@import './variables.scss';

/* 内外边距 */
.m-0 {
  margin: 0;
}
.m-xs {
  margin: $spacing-xs;
}
.m-sm {
  margin: $spacing-sm;
}
.m {
  margin: $spacing-base;
}
.m-md {
  margin: $spacing-md;
}
.m-lg {
  margin: $spacing-lg;
}

.mt-0 {
  margin-top: 0;
}
.mt-xs {
  margin-top: $spacing-xs;
}
.mt-sm {
  margin-top: $spacing-sm;
}
.mt {
  margin-top: $spacing-base;
}
.mt-md {
  margin-top: $spacing-md;
}
.mt-lg {
  margin-top: $spacing-lg;
}

.mr-0 {
  margin-right: 0;
}
.mr-xs {
  margin-right: $spacing-xs;
}
.mr-sm {
  margin-right: $spacing-sm;
}
.mr {
  margin-right: $spacing-base;
}
.mr-md {
  margin-right: $spacing-md;
}
.mr-lg {
  margin-right: $spacing-lg;
}

.mb-0 {
  margin-bottom: 0;
}
.mb-xs {
  margin-bottom: $spacing-xs;
}
.mb-sm {
  margin-bottom: $spacing-sm;
}
.mb {
  margin-bottom: $spacing-base;
}
.mb-md {
  margin-bottom: $spacing-md;
}
.mb-lg {
  margin-bottom: $spacing-lg;
}

.ml-0 {
  margin-left: 0;
}
.ml-xs {
  margin-left: $spacing-xs;
}
.ml-sm {
  margin-left: $spacing-sm;
}
.ml {
  margin-left: $spacing-base;
}
.ml-md {
  margin-left: $spacing-md;
}
.ml-lg {
  margin-left: $spacing-lg;
}

.p-0 {
  padding: 0;
}
.p-xs {
  padding: $spacing-xs;
}
.p-sm {
  padding: $spacing-sm;
}
.p {
  padding: $spacing-base;
}
.p-md {
  padding: $spacing-md;
}
.p-lg {
  padding: $spacing-lg;
}

.pt-0 {
  padding-top: 0;
}
.pt-xs {
  padding-top: $spacing-xs;
}
.pt-sm {
  padding-top: $spacing-sm;
}
.pt {
  padding-top: $spacing-base;
}
.pt-md {
  padding-top: $spacing-md;
}
.pt-lg {
  padding-top: $spacing-lg;
}

.pr-0 {
  padding-right: 0;
}
.pr-xs {
  padding-right: $spacing-xs;
}
.pr-sm {
  padding-right: $spacing-sm;
}
.pr {
  padding-right: $spacing-base;
}
.pr-md {
  padding-right: $spacing-md;
}
.pr-lg {
  padding-right: $spacing-lg;
}

.pb-0 {
  padding-bottom: 0;
}
.pb-xs {
  padding-bottom: $spacing-xs;
}
.pb-sm {
  padding-bottom: $spacing-sm;
}
.pb {
  padding-bottom: $spacing-base;
}
.pb-md {
  padding-bottom: $spacing-md;
}
.pb-lg {
  padding-bottom: $spacing-lg;
}

.pl-0 {
  padding-left: 0;
}
.pl-xs {
  padding-left: $spacing-xs;
}
.pl-sm {
  padding-left: $spacing-sm;
}
.pl {
  padding-left: $spacing-base;
}
.pl-md {
  padding-left: $spacing-md;
}
.pl-lg {
  padding-left: $spacing-lg;
}

/* flex布局 */
.flex {
  display: flex;
}
.flex-column {
  flex-direction: column;
}
.flex-row {
  flex-direction: row;
}
.flex-wrap {
  flex-wrap: wrap;
}
.flex-nowrap {
  flex-wrap: nowrap;
}
.flex-shrink {
  flex-shrink: 1;
}
.flex-grow {
  flex-grow: 1;
}

.justify-start {
  justify-content: flex-start;
}
.justify-end {
  justify-content: flex-end;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.justify-around {
  justify-content: space-around;
}

.align-start {
  align-items: flex-start;
}
.align-end {
  align-items: flex-end;
}
.align-center {
  align-items: center;
}
.align-baseline {
  align-items: baseline;
}
.align-stretch {
  align-items: stretch;
}

/* 文本样式 */
.text-xs {
  font-size: $font-size-xs;
}
.text-sm {
  font-size: $font-size-sm;
}
.text-base {
  font-size: $font-size-base;
}
.text-md {
  font-size: $font-size-md;
}
.text-lg {
  font-size: $font-size-lg;
}
.text-xl {
  font-size: $font-size-xl;
}
.text-xxl {
  font-size: $font-size-xxl;
}

.text-primary {
  color: $text-color-primary;
}
.text-secondary {
  color: $text-color-secondary;
}
.text-placeholder {
  color: $text-color-placeholder;
}
.text-white {
  color: $text-color-white;
}
.text-theme {
  color: $primary-color;
}
.text-success {
  color: $secondary-color;
}
.text-warning {
  color: #ff9800;
}
.text-danger {
  color: #f44336;
}

.text-left {
  text-align: left;
}
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}

.text-bold {
  font-weight: bold;
}
.text-normal {
  font-weight: normal;
}
.text-light {
  font-weight: 300;
}

.text-ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.text-ellipsis-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* 背景颜色 */
.bg-white {
  background-color: $bg-color-white;
}
.bg-light {
  background-color: $bg-color-light;
}
.bg-primary {
  background-color: $primary-color;
}
.bg-primary-light {
  background-color: $primary-color-light;
}
.bg-secondary {
  background-color: $secondary-color;
}
.bg-secondary-light {
  background-color: $secondary-color-light;
}

/* 圆角 */
.radius-xs {
  border-radius: $border-radius-xs;
}
.radius-sm {
  border-radius: $border-radius-sm;
}
.radius {
  border-radius: $border-radius-base;
}
.radius-md {
  border-radius: $border-radius-md;
}
.radius-lg {
  border-radius: $border-radius-lg;
}
.radius-circle {
  border-radius: $border-radius-circle;
}

/* 边框 */
.border {
  border: 1px solid $border-color;
}
.border-top {
  border-top: 1px solid $border-color;
}
.border-right {
  border-right: 1px solid $border-color;
}
.border-bottom {
  border-bottom: 1px solid $border-color;
}
.border-left {
  border-left: 1px solid $border-color;
}

/* 阴影 */
.shadow {
  box-shadow: $box-shadow;
}
.shadow-sm {
  box-shadow: $box-shadow-light;
}
.shadow-lg {
  box-shadow: $box-shadow-dark;
}

/* 定位 */
.relative {
  position: relative;
}
.absolute {
  position: absolute;
}
.fixed {
  position: fixed;
}
.sticky {
  position: sticky;
}

/* 常用布局 */
.container {
  padding: $spacing-base;
}
.safe-area-bottom {
  padding-bottom: constant(safe-area-inset-bottom);
  padding-bottom: env(safe-area-inset-bottom);
}

/* 其他 */
.overflow-hidden {
  overflow: hidden;
}
.w-100 {
  width: 100%;
}
.h-100 {
  height: 100%;
}
.full-width {
  width: 100vw;
}
.full-height {
  height: 100vh;
} 